const express = require('express');
const router = express.Router();
const posts_handler = require("../../router_handler/user/Articles");

// 获取文章列表及其评论
router.get('/', posts_handler.getAllArticles);
//新增文章
router.post('/', posts_handler.addArticle);
//删除文章
router.delete('/', posts_handler.deleteArticleByIds);
//修改文章
router.put('/:articleId', posts_handler.updateArticleById);

//根据id获取文章及其评论
router.get('/:articleId', posts_handler.getArticleById);


module.exports = router;